<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Docs For Class Registry</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">newt-rtls<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                                      
                      		[ <a href="../classtrees_newt-rtls.html" class="menu">class tree: newt-rtls</a> ]
		[ <a href="../elementindex_newt-rtls.html" class="menu">index: newt-rtls</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">newt-rtls</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_default.html">default</a><br />
              <a href="../li_newt-rtls.html">newt-rtls</a><br />
      	</div>
      <br />
                        <b>Files:</b><br />
        <div class="package">
				<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---BadDatabaseQueryException.class.php.html">BadDatabaseQueryException.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---BadRequestException.class.php.html">BadRequestException.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---CannotConnectException.class.php.html">CannotConnectException.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---DataConnector.class.php.html">DataConnector.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---Event.class.php.html">Event.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---Person.class.php.html">Person.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---Registry.class.php.html">Registry.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---Tag.class.php.html">Tag.class.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../newt-rtls/_lib---Tracker.class.php.html">Tracker.class.php</a></span><br />
	  </div>
            <br />
                  <b>Classes:</b><br />
        <div class="package">
		    		<a href="../newt-rtls/BadDatabaseQueryException.html">BadDatabaseQueryException</a>    	 <br />
	    		<a href="../newt-rtls/BadRequestException.html">BadRequestException</a>    	 <br />
	    		<a href="../newt-rtls/CannotConnectException.html">CannotConnectException</a>    	 <br />
	    		<a href="../newt-rtls/DataConnector.html">DataConnector</a>    	 <br />
	    		<a href="../newt-rtls/Event.html">Event</a>    	 <br />
	    		<a href="../newt-rtls/Person.html">Person</a>    	 <br />
	    		<a href="../newt-rtls/Registry.html">Registry</a>    	 <br />
	    		<a href="../newt-rtls/Tag.html">Tag</a>    	 <br />
	    		<a href="../newt-rtls/Tracker.html">Tracker</a>    	 <br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Registry</h1>
Source Location: /lib/Registry.class.php<br /><br />

<h2 class="class-name">Class Registry</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Class Overview</div>
	<div class="nav-bar">
					<span class="disabled">Class Overview</span>
						
											| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
														| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
								</div>
	<div class="info-box-body">
		<table width="100%" border="0">
		<tr><td valign="top" width="60%" class="class-overview">

        		<p align="center" class="short-description"><strong>Registry class registers tags in the database and assigns  them to people. It also deregisters tags from the database.
</strong></p>

		<p class="notes">
			Located in <a class="field" href="_lib---Registry.class.php.html">/lib/Registry.class.php</a> [<span class="field">line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a19">19</a></span>]
		</p>

		
		<pre></pre>

		
		
		
		</td>

				<td valign="top" width="20%" class="class-overview">
		<p align="center" class="short-description"><strong><a href="#sec_vars">Properties</a></strong></p>
		<ul>
		  		  <li><a href="../newt-rtls/Registry.html#var$dbh">$dbh</a></li>
		  		</ul>
		</td>
		
				<td valign="top" width="20%" class="class-overview">
		<p align="center" class="short-description"><strong><a href="#sec_methods">Methods</a></strong></p>
		<ul>
		  		  <li><a href="../newt-rtls/Registry.html#methodRegistry">Registry</a></li>
		  		  <li><a href="../newt-rtls/Registry.html#methodaddPerson">addPerson</a></li>
		  		  <li><a href="../newt-rtls/Registry.html#methodassignTag">assignTag</a></li>
		  		  <li><a href="../newt-rtls/Registry.html#methodlistAssignedTags">listAssignedTags</a></li>
		  		  <li><a href="../newt-rtls/Registry.html#methodlistPeople">listPeople</a></li>
		  		  <li><a href="../newt-rtls/Registry.html#methodunassignTag">unassignTag</a></li>
		  		</ul>
		</td>
		
		</tr></table>
		<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
</div>




	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Property Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
									| <span class="disabled">Property Summary</span> | <a href="#sec-vars">Properties Detail</a>
												| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
							    				</div>
		<div class="info-box-body">
			<div class="var-summary">
			<table border="0" cellspacing="0" cellpadding="0" class="var-summary">
																			<div class="var-title">
					<tr><td class="var-title"><span class="var-type-summary">mixed</span>&nbsp;&nbsp;</td>
					<td class="var-title"><a href="#$dbh" title="details" class="var-name-summary">$dbh</a>&nbsp;&nbsp;</td>
					<td class="var-summary-description"></td></tr>
				</div>
										</table>
			</div>
			<br /><div class="top">[ <a href="#top">Top</a> ]</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
																		| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
							    					| <span class="disabled">Method Summary</span> | <a href="#sec-methods">Methods Detail</a>
		</div>
		<div class="info-box-body">
			<div class="method-summary">
				<table border="0" cellspacing="0" cellpadding="0" class="method-summary">
																																																																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result"><a href="../newt-rtls/Registry.html">Registry</a></span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#Registry" title="details" class="method-name">Registry</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Default constructor initiates connection to database.</td></tr>
				</div>
																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result">void</span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#addPerson" title="details" class="method-name">addPerson</a>()&nbsp;&nbsp;</td>
					<td class="method-definition"></td></tr>
				</div>
																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result">boolean</span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#assignTag" title="details" class="method-name">assignTag</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Assigns a registered tag to a person.</td></tr>
				</div>
																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result">Tag[]</span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#listAssignedTags" title="details" class="method-name">listAssignedTags</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Method for returning list of assigned tags or assigned to the  specific person by ID.</td></tr>
				</div>
																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result">Person[]</span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#listPeople" title="details" class="method-name">listPeople</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">This method returns a list of people registered in the system.</td></tr>
				</div>
																<div class="method-definition">
											<tr><td class="method-definition"><span class="method-result">boolean</span>&nbsp;&nbsp;</td>
										<td class="method-definition"><a href="#unassignTag" title="details" class="method-name">unassignTag</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Method to unassign a tag assigned to a person.</td></tr>
				</div>
												</table>
			</div>
			<br /><div class="top">[ <a href="#top">Top</a> ]</div>
		</div>
	</div>

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Properties</div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
													| <a href="#sec-var-summary">Property Summary</a> | <span class="disabled">Properties Detail</span>
															| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
												</div>
		<div class="info-box-body">
			<a name="var$dbh" id="$dbh"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>&nbsp;&nbsp;
			<span class="var-name">$dbh</span>
						<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a20">20</a>]</span>
		</span>
	</div>

		<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
<br />


	
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
		</div>
	</div>

	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
																		| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
																	| <a href="#sec-method-summary">Method Summary</a> | <span class="disabled">Methods Detail</span>
					</div>
		<div class="info-box-body">
			<a name='method_detail'></a>

<a name="methodRegistry" id="Registry"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">Constructor Registry</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a31">31</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code><a href="../newt-rtls/Registry.html">Registry</a> Registry(
string
$server, string
$username, string
$password, string
$database&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Default constructor initiates connection to database.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$server:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$username:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$password:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$database:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Throws:</strong>&nbsp;&nbsp;</td><td>CannotConnectException</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodaddPerson" id="addPerson"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">addPerson</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a37">37</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>void addPerson(
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	
	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodassignTag" id="assignTag"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">assignTag</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a48">48</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>boolean assignTag(
int
$person, string
$tagid, 
$mac&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Assigns a registered tag to a person.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">int</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$person:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$tagid:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$mac:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Throws:</strong>&nbsp;&nbsp;</td><td>BadDatabaseQueryException</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodlistAssignedTags" id="listAssignedTags"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">listAssignedTags</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a106">106</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>Tag[] listAssignedTags(
[int
$personId = NULL]&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Method for returning list of assigned tags or assigned to the  specific person by ID.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">int</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$personId:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Return:</strong>&nbsp;&nbsp;</td><td>Array of Tag objects</td>
  </tr>
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Throws:</strong>&nbsp;&nbsp;</td><td>BadDatabaseQueryException</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodlistPeople" id="listPeople"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">listPeople</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a84">84</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>Person[] listPeople(
[boolean
$getTagInfo = false]&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>This method returns a list of people registered in the system.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">boolean</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$getTagInfo:&nbsp;</span></td>
				<td>
				<span class="var-description"> Set to True if you want to get info  about assigned tags for each person.</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Return:</strong>&nbsp;&nbsp;</td><td>Array of Person objects</td>
  </tr>
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Throws:</strong>&nbsp;&nbsp;</td><td>BadDatabaseQuery</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodunassignTag" id="unassignTag"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">unassignTag</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_newt-rtls__libRegistry.class.php.html#a64">64</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>boolean unassignTag(
int
$assignedId&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Method to unassign a tag assigned to a person.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">int</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$assignedId:&nbsp;</span></td>
				<td>
				<span class="var-description"> This is is stored in the database  when tag is assigned to a person.</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Throws:</strong>&nbsp;&nbsp;</td><td>BadDatabaseQueryException</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
		</div>
	</div>


        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Tue, 29 Jul 2008 13:07:51 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>